-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat(io-intelligence): make api key optional and improve model handling #8422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(io-intelligence): make api key optional and improve model handling #8422
Conversation
- Make IO Intelligence API key optional for models endpoint - Add model fetching with fallback to defaults - Enhance model info parsing with additional fields from API - Remove hardcoded model properties in favor of API-provided data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some issues that need attention. See inline comments.
…to BaseProvider - Remove inheritance from BaseOpenAiCompatibleProvider - Implement direct OpenAI client integration with custom base URL - Fix TypeScript errors: remove topP destructuring, correct stream type - Update getModel() method to use proper type inference - Maintain compatibility with existing IO Intelligence API format - All tests passing after refactoring
…mentation - Remove explicit apiKey expectation from configuration test - Update test to expect original mockOptions instead of modified options - Ensure compatibility with BaseProvider refactoring - All 13 tests passing after update
- Add getModels mock to io-intelligence.spec.ts to provide model data - Add safety check in IOIntelligenceHandler.getModel to handle undefined models - Ensure tests pass by properly initializing model data structure
- Fixed ClineProvider.spec.ts to include io-intelligence mock in correct order - Updated webviewMessageHandler.spec.ts to handle io-intelligence provider in all test cases - All tests now pass with io-intelligence provider returning mockModels instead of empty object
Review Complete ✅No new issues found in the latest changes. All previously flagged issues have been resolved:
Latest changes reviewed:
Previous ReviewsMention @roomote in a comment to trigger your PR Fixer agent and make changes to this pull request. |
…nce-getmodels # Conflicts: # src/core/webview/__tests__/ClineProvider.spec.ts # src/core/webview/__tests__/webviewMessageHandler.spec.ts
- Removed error throw when API key is missing in IOIntelligenceHandler constructor
|
Hi Daniel, Hi Hannes Thank you for the your review. I have addressed all the points you raised: Changes made:
The implementation now matches the exact pattern used by OpenRouter and Glama. API key is validated at the UI level but the models endpoint can fetch without authentication. Is there anything I missed or any other concerns? Thank you Best regards |
…conflicts by accepting upstream test changes
🚀 feat(io-intelligence): Make API key optional and implement dynamic model fetching
Summary
This PR enhances the IO Intelligence provider by making the API key optional for model retrieval and improving the overall model handling implementation.
Key Changes 🔓 No Authentication Required for Model Discovery
Technical Details
Benefits
Important
This PR makes the API key optional for IO Intelligence model fetching, implements dynamic model fetching with caching, and improves model handling and error management.
/api/v1/modelsno longer requires authentication.io-intelligence.tsandfetchers/io-intelligence.ts.parseIOIntelligenceModelfunction for better token allocation.max_tokensto 20% of context window if not provided.io-intelligence.ts: Updated for dynamic model fetching and error handling.fetchers/io-intelligence.ts: New API fetcher with caching and schema validation.webviewMessageHandler.ts: Updated to always fetch models.api.ts: UpdatedGetModelsOptionstype to make API key optional.This description was created by
for 589841c. You can customize this summary. It will automatically update as commits are pushed.